package com.tanhua.dubbo.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanhua.model.domain.UserInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * Created by Fausto on 2021/9/26 20:34
 */
public interface UserInfoMapper extends BaseMapper<UserInfo> {
    @Select("SELECT info.id, info.avatar, info.nickname, info.gender, info.age FROM tb_user_info info INNER JOIN tb_black_list black ON black.black_user_id = info.id WHERE black.user_id = #{userId}")
    IPage<UserInfo> findBlackList(@Param("pages") Page pages,@Param("userId") Long userId);
}
